﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SN.Models;
using SN.Data;

namespace SN.Services
{
    public class UserService : IUserService
    {

        public int IsUserexist(string UserId, string Password, ref string Msg)
        {
            if (UserId.ToUpper() != "ZZJWKJ")
            {
                Msg = "用户名不存在!";
                return 0;
            }
            //判断用户名是否存在
            //int i = DBUtility.DB.Count<T_User>(T_User._.User_Code == UserId);
            //if (i != 1)
            //{
            //    Msg = "用户名不存在!";
            //    return 0;
            //}

            ////判断用户名和密码
            //i = DBUtility.DB.Count<T_User>(T_User._.User_Code == UserId && T_User._.User_Password == Password);
            //if (i != 1)
            //{
            //    Msg = "用户密码录入错误!";
            //    return 0;
            //}
            ////填写User
            //SNService.User = DBUtility.DB.From<T_User>().Where(T_User._.User_Code == UserId).ToSingle();

            return 1;
        }
    }
}
